package com.javaweb.text;

import com.alibaba.fastjson.JSON;
import com.util.JDBCUtil;

public class JSONDemo {
    public static void main(String[] args) {
        Response response = new Response();
        Integer page = 2;
        Integer size = 10;

        response.setData(JDBCUtil.getList(User.class, "SELECT * FROM `test_table` LIMIT ?,?",(page -1 )*size,size));
        String s = JSON.toJSONString(response.getData());
        System.out.println(s);
    }
}
